package com.jh.user.repository;

import com.jh.user.pojo.CongMingRate;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CongMingRateRepository extends JpaRepository<CongMingRate, Long>, JpaSpecificationExecutor<CongMingRate> {
    @Query("select c from CongMingRate c where c.userId = :userId and c.brandId = 407 and c.status = 1")
    List<CongMingRate> findByUserId(@Param("userId") long userId);
}
